package generator

import "beergo/plugins/maker"

func init() {
	ComConfig()
	ComConfigType()
	ComConfigGroup()
}

func ComConfig() {
	c := maker.CreateTable("ComConfig","配置项","com")
	c.AddName()
	c.AddText("k","键")
	c.AddManyToOne("t","类型","ComConfigType")
	c.AddManyToOne("g","组","ComConfigGroup")
	c.AddText("v","值")//1 text
	c.AddJson("pic","单图")//2 pic
	c.AddJson("pics","多图")//3 pics
	c.AddJson("files","附件")//4 files
	c.AddArt("art","富文本")//5 art
	c.Generate()
}
func ComConfigType(){
	c := maker.CreateTable("ComConfigType","值类型","com")
	c.AddName()
	c.Generate()
}
func ComConfigGroup(){
	c := maker.CreateTable("ComConfigGroup","值类型","com")
	c.AddName()
	c.Generate()
}